package query;

import query.QuestionAnalyzer.ANSWER_TYPE;

public class AnalyzedQuestion {

	private String identifier;
	private String question;
	private String[] words;
	private String[] tags;
	private ANSWER_TYPE type;
	private String[] keywords;
	private String[] keytags;
	// Para guardar el tiempo verbal de la query asociada.
	private String queryVerbTense;

	public String getQueryVerbTense() {
		return queryVerbTense;
	}

	AnalyzedQuestion(String identifier, String question, String[] words, String[] tags,
			ANSWER_TYPE type, String[] keywords, String[] keytags) {
		this.identifier = identifier;
		this.question = question;
		this.words = words;
		this.tags = tags;
		this.type = type;
		this.keywords = keywords;
		this.keytags = keytags;

		queryVerbTense = calculateQueryVerbTense();
	}

	private String calculateQueryVerbTense() {
		for (String tag : tags) {
			if (tag.startsWith("VB")) {
				return tag;
			}
		}
		return null;
	}
	
	public String getIdentifier() {
		return identifier;
	}

	public String getQuestion() {
		return question;
	}

	public String[] getWords() {
		return words;
	}

	public String[] getTags() {
		return tags;
	}

	public ANSWER_TYPE getType() {
		return type;
	}

	public String[] getKeywords() {
		return keywords;
	}

	public String[] getKeytags() {
		return keytags;
	}

}
